
public class Rectangle {
	private double x1, x2;
	private double y1, y2;
	
	Rectangle()
	{
		this.x1 = 0.0;
		this.x2 = 0.0;
		this.y1 = 0.0;
		this.y2 = 0.0;
	}
	
	public void setPoints(double x1, double y1, double x2, double y2) {
		this.x1 = x1;
		this.y1 = y1;
		this.x2 = x2;
		this.y2 = y2;
	}
	
	public Double getArea() {
		return Math.abs((this.x2 - this.x1) * (this.y2 - this.y1));
	}
	
	public Double getDiagonal() {
		return Math.sqrt(Math.pow((this.x2 - this.x1), 2) + Math.pow((this.y2 - this.y1), 2));
	}
}
